package com.l2dot.gameserver.handler.skillhandlers;

import com.l2dot.gameserver.handler.ISkillHandler;
import com.l2dot.gameserver.model.L2Character;
import com.l2dot.gameserver.model.L2Object;
import com.l2dot.gameserver.model.L2Skill;
import com.l2dot.gameserver.model.L2Skill.SkillType;

public class GiveSp implements ISkillHandler
{
   private static final SkillType[] SKILL_IDS = {SkillType.GIVE_SP};
   
   public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets)
   {
      for (L2Object obj : targets)
      {
         L2Character target = (L2Character) obj;
         if (target != null)
         {
            int spToAdd = (int) skill.getPower();
            target.addExpAndSp(0, spToAdd);
         }
      }
   }
   
   public SkillType[] getSkillIds()
   {
      return SKILL_IDS;
   }
}